public class PowerAdapter implements DC5V{

    public PowerAdapter( AC220 inputPowder ){
        this.ac220Input = inputPowder;
    }
    public PowerAdapter(){}


    private AC220 ac220Input;

    @Override
    public int outPut5V() {

        int adapterInput = this.ac220Input.outPutVoltage();
        int adapterOutput = adapterInput / 44;

        System.out.println("转换完成，输出电压为："+adapterOutput);

        return adapterOutput;
    }

    @Override
    public int outPut12() {
        int adapterInput = this.ac220Input.outPutVoltage();
        int adapterOutput = adapterInput / 18;
        return adapterOutput;
    }

    @Override
    public int outPut24() {
        return 0;
    }

    public AC220 getAc220Input() {
        return ac220Input;
    }

    public void setAc220Input(AC220 ac220Input) {
        this.ac220Input = ac220Input;
    }
}
